package cn.minimelon.api.config;

import org.beetl.core.GroupTemplate;
import org.beetl.core.resource.StringTemplateResourceLoader;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;

import java.io.IOException;

@Configuration
public class TemplateConfig {
    @Bean
    public GroupTemplate buildGroupTemplate() throws IOException {
        StringTemplateResourceLoader resourceLoader = new StringTemplateResourceLoader();
        org.beetl.core.Configuration cfg = org.beetl.core.Configuration.defaultConfiguration();
        return new GroupTemplate(resourceLoader, cfg);
    }
}
